package demo;
public class MainIN {
    public static Animal TestAnimal1() {
        Dog dog =new Dog(11,"wangcai");
        return dog;
    }
    public static Animal TestAnimal2() {
        Cat cat =new Cat(12,"mimi");
        return cat;
    }
    public static void main(String[] args) {
        Animal animal1=TestAnimal1();
        Animal animal2=TestAnimal2();
        animal1.eat();
        animal2.eat();
    }
}
